home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boot Disc 12
/
boot-disc-1997-08.iso
/
Cakewalk
/
AD.1
/
Scale Velocity.cal
< prev
next >
Wrap
Text File
|
1997-05-15
|
553b
|
28 lines
;; Scale Velocity.cal
;;
;; This is a sample CAL program that implements an editing command to
;; scale note velocities by a certain percentage.
;;
;; Demonstrates:
;;
;; (forEachEvent)
;; Getting input from the user
;; Arithmetic operators
;; Event kind and parameter variables
(do
(include "need20.cal") ; Require version 2.0 or higher of CAL
(int percent 100)
(getInt percent "Percentage?" 1 1000)
(forEachEvent
(if (== Event.Kind NOTE)
(do
(*= Note.Vel percent)
(/= Note.Vel 100)
)
)
)
)